/* 
 * File:   SubtractionQuiz.cpp
 * Author: Yujie Hao
 *
 * Created on March 17, 2013, 11:13 PM
 */

#include <cstdlib>
#include <ctime>
#include <iostream>
using namespace std;

/*
 * 
 */
int main(int argc, char** argv) {
    srand(time(0));
    int number1 = rand() % 100, number2 = rand() % 100, number3;
     if (number1 < number2)
    {
        number3 = number2;
        number2 = number1;
        number1 = number3;
    }
    
    cout << "What is " << number1 << " - " << number2 << "?" << endl << "Type the answer:";
    
    cin >> number3;
    
    if (number3 == number1 - number2)
    {
        cout << "Yes, you are right!" << endl;
    }
    else 
    {
        cout << "No, you are wrong!" << endl;
    }
    
    return 0;
}

